#if !defined (WINMAIN_H_CEAE99ED_07F1_42E4_91CF_E995D67DF832_)
#define WINMAIN_H_CEAE99ED_07F1_42E4_91CF_E995D67DF832_

// standard definitions
#define STRICT												// enable strict type-checking of Windows handles
#define NOSERVICE											// allow the exclusion of uncommon features
#define NOMCX												// allow the exclusion of uncommon features
#define NOIME												// allow the exclusion of uncommon features
#define NOSOUND												// allow the exclusion of uncommon features
#define NOCOMM												// allow the exclusion of uncommon features
#define NOKANJI												// allow the exclusion of uncommon features
#define NORPC												// allow the exclusion of uncommon features
#define NOPROXYSTUB											// allow the exclusion of uncommon features
#define NOIMAGE												// allow the exclusion of uncommon features
#define NOTAPE												// allow the exclusion of uncommon features

#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES			1	// use the new secure functions in the CRT
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT	1	// use the new secure functions in the CRT

// standard includes
#include <windows.h>		// fundamental Windows header file
#include <windowsx.h>		// useful Windows programming extensions
#include <stdlib.h>			// standard C library routines
#include <stdio.h>			// standard input/output routines
#include <tchar.h>			// character mappings

#pragma warning (disable:4100)	// unreferenced formal parameter

#ifndef __cplusplus
	// mimic a boolean type in C
	typedef enum {false=FALSE, true=TRUE} bool;
#endif

// medio font file data struct for glyphs
typedef struct tagMEDFONTGLYPH
{
	unsigned __int32 nBuffSize;		// size of the raw bitmap data (can be calced, but cached for speed)
	unsigned __int16 nCharCode;		// 16-bit character code for the glyph (enables unicode support)
	unsigned __int16 nAdvance;		// advance length for the glpyh (used with pen position, cached for speed)
	unsigned __int16 nBBoxWidth;	// width of bounding box for the glyph
	unsigned __int16 nBBoxHeight;	// height of bounding box for the glyph
	unsigned __int16 nTexWidth;		// width of the texture size to use (actual size, cached for speed, must be POT)
	__int16 nOrigX;					// with nOrigY, specifies the top-left corner of the glyph
	__int16 nOrigY;					// with nOrigX, specifies the top-left corner of the glyph

} MEDFONTGLYPH, *PMEDFONTGLYPH;

// medio font file data struct for the file header
typedef struct tagMEDFONTHEADER
{
	unsigned __int16 nAscent;		// ascent/ascender from the baseline (in pixels)
	unsigned __int16 nDescent;		// descent/descender from the baseline (in pixels)
	unsigned __int16 nExternalLead;	// external leading (used for multiline spacing)
	unsigned __int16 nTexHeight;	// height of the texture size to use (actual size, cached for speed, must be POT)
	unsigned __int16 nMaxTexWidth;	// width of the maximum texture size to use (actual size, cached for speed, must be POT)
	unsigned __int16 nSpaceWidth;	// width to use for the space char (since we don't store a texture for it)
	unsigned __int16 nTabWidth;		// width to use for the tab char (since we don't store a texture for it)
	unsigned __int16 nNumGlyphs;	// number of glpyhs in the file
	unsigned __int16 nNumKernPairs;	// number of kerning pairs in the file (set to 0 for no kerning info)
	unsigned __int8 nToken;			// token  to identify the file type
	unsigned __int8 nVersion;		// token  to identify the file format version
	unsigned __int8 nBPP;			// bits per pixel for the glpyh data
	unsigned __int8 nLittleEndian;	// was the file saved in little or big endian format

} MEDFONTHEADER, *PMEDFONTHEADER;

#endif  // WINMAIN.H
